package cn.edu.xmut.third;

public class Factory {
    public static IBeing getBeing(String type){
        if(type.equalsIgnoreCase("dog")){
            return new Dog();
        }else {
            return new Cat();
        }
    }
}
